04. Playing with Rays
Playing with Rays
Course Asset
- Download: VR Software Development - Physics and Audio
- Unity project: Physics and Audio
- Scene: Assets > UdacityVR > Scenes > Island.unity
Video Addendum
At 2:27 minutes into the video (and any time the camera is selected)
When the instructor adds the DetectTreasure script component to the Main Camera game object:
- The
Main Cameragame object has a Physics Raycaster component. - The Physics Raycaster component is not necessary because the DetectTreasure script component casts the ray.
Important! In this exercise, we do not need Unity's Physics Raycaster (or Google's Gvr Pointer Physics Raycaster) because the DetectTreasure script component casts the ray.
Recommended Reading
- Unity Scripting API: Physics.Raycast
- Unity Scripting API: MonoBehaviour.FixedUpdate()
Additional Reading
- Unity Scripting API: MonoBehaviour.Update()